Release 10.1A: OpenEdge Application Server:
Developing WebSpeed Applications
Program variables
You have read quite a bit about how database transactions are backed out and how database changes are undone. But what happens to work done with variables?
Any changes made to variables in a database transaction or subtransaction block are undone whenever a database transaction or subtransaction is backed out. The variables are restored to the values they had at the beginning of the transaction or subtransaction that is undone. Variables specifically defined as
NO-UNDOare not undone in this case. However, changes to variables made outside a database transaction are never undone since only transaction and subtransaction blocks can be undone.Although backing out of variables is useful in many cases, there is a certain amount of overhead associated with undoing variables in database transactions. If you are doing extensive calculations and have no need for undo services, then consider using the
NO-UNDOoption on variables and arrays.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |